<?php 
if(!isset($_SESSION)) session_start();


if (isset($_REQUEST["study_year"])) $study_year = $_REQUEST["study_year"];
else if (isset($_SESSION["study_year"])) $study_year = $_SESSION["study_year"];

if (isset($_REQUEST["Keyword"])) $Keyword = $_REQUEST["Keyword"];
else if (isset($_SESSION["Keyword"])) $Keyword = $_SESSION["Keyword"];

$ProspectusCode = 0;




header("Content-type: text/xml"); 


//http://www.peterborough.ac.uk/prc/service.asmx/KeywordSearch
//StudyYear=string&Category=string&SubjectAreaCode=string&Keyword=string

$params = "StudyYear={$study_year}&SubjectAreaCode={$ProspectusCode}&Category=&Keyword={$Keyword}";
//echo $params;
$xml = simplexml_load_file("http://{$_SERVER['SERVER_NAME']}/WebServices/PRC/service.asmx/KeywordSearch?{$params}");
$xml = str_replace("utf&#x2013;8", "utf-8", $xml);
echo $xml;
//print_r ($xml);


?>